Methods for scheduling micro-instructions and apparatus using the same

ABSTRACT

A method for scheduling micro-instructions, performed by a qualifier, is provided. The method includes the following steps: detecting a load write-back signal broadcasted by a load execution unit; determining whether to trigger a load-detection counting logic according to content of the load write-back signal; determining whether an execution status of a load micro-instruction is cache hit when the triggered load-detection counting logic reaches a predetermined value; and driving a release circuit to remove the first micro-instruction in a reservation station queue when the execution status of the load micro-instruction is cache hit and the first micro-instruction has been dispatched to an arithmetic and logic unit for execution.

CROSS REFERENCE TO RELATED APPLICATIONS

This Application claims priority of China Patent Application No.201810088322.4, filed on Jan. 30, 2018, the entirety of which isincorporated by reference herein.

BACKGROUND OF THE INVENTION Field of the Invention

The invention relates to a microprocessor technology, and moreparticularly to a method for scheduling micro-instructions and anapparatus using the same.

Description of the Related Art

For current superscalar microprocessors, a reservation station isresponsible for scheduling all micro-instructions. Except for loadmicro-instructions, the delay of the execution of the mostmicro-instructions is fixed. Memory systems in microprocessors typicallyemploy a hierarchical architecture, including: a Level-1 data cache, aLevel-2 data cache, and a main memory. Since a miss may occur in theLevel-1 data cache (referred to as “L1 cache miss”) when a loadmicro-instruction is executed, the delay is variable. Some arithmeticlogic micro-instructions depend on the load micro-instruction, that is,the arithmetic logic micro-instructions require the execution result ofthe load micro-instruction as its source operand. In order to simplifythe design, a conventional reservation station usually also regards thedelay of the execution of a load micro-instruction as a fixed value.That is, the reservation station assumes that a result can be obtainedat the n^(th) clock cycle which occurs after a load micro-instruction isdispatched to the load pipeline. Therefore, the reservation stationdispatches a following arithmetic logic micro-instruction depending onthe load micro-instruction to the arithmetic and logic unit (ALU) at the(n−2)^(th) clock cycle after the load micro-instruction is dispatched tothe load pipeline, and further clears the arithmetic logicmicro-instruction in the corresponding queue. When a miss occurs in thecache (cache miss) after the n^(th) clock cycles after the loadmicro-instruction is dispatched, the arithmetic logic micro-instructionthat has been dispatched to the arithmetic and logic unit would failbecause the data is not ready yet, resulting that the reservationstation needs to replay the arithmetic logic micro-instruction. However,replaying the arithmetic logic micro-instruction may take a lot of timeand reduce the performance of the microprocessor. Therefore, a methodfor scheduling arithmetic logic micro-instructions and an apparatususing the same to avoid replaying the arithmetic logicmicro-instructions due to cache misses.

BRIEF SUMMARY OF THE INVENTION

An exemplary embodiment of a method for scheduling micro-instructions isprovided. The method is performed by a qualifier and comprises the stepsof detecting a load write-back signal broadcasted by a load executionunit; determining whether to trigger a load-detection counting logicaccording to content of the load write-back signal; determining whetheran execution status of a load micro-instruction is cache hit when thetriggered load-detection counting logic reaches a predetermined value;and driving a release circuit to remove the micro-instruction in areservation station queue when the execution status of the loadmicro-instruction is cache hit and the micro-instruction has beendispatched to an arithmetic and logic unit for execution.

An exemplary embodiment of a scheduler device for micro-instructions isprovided. The scheduler comprises a reservation station queue, a releasecircuit, and a qualifier. The release circuit is coupled to thereservation station queue. The qualifier is coupled to the releasecircuit. The qualifier detects a load write-back signal broadcasted by aload execution unit and determines whether to trigger a load-detectioncounting logic according to content of the load write-back signal. Thefirst qualifier determines whether an execution status of a loadmicro-instruction is cache hit when the triggered load-detectioncounting logic reaches a predetermined value and drives the releasecircuit to remove the micro-instruction in the reservation station queuewhen the execution status of the load micro-instruction is cache hit andthe micro-instruction has been dispatched to an arithmetic and logicunit for execution.

In an exemplary embodiment, the qualifier is associated with themicro-instruction, and the micro-instruction depends on the loadmicro-instruction executed by the load execution unit.

According to the above method and device for schedulingmicro-instructions, the micro-instruction in the reservation stationqueue is retained, which avoids a replay operation.

In addition, it is worth noted that since the execution statebroadcasted by the load execution unit does not carry any uniqueidentification code, the above method and device for schedulingmicro-instructions of the present invention ensures themicro-instruction associated with the qualifier in which theload-detection counting logic reaches the predetermined value mustdirectly or indirectly depend on the load micro-instructioncorresponding to the execution state broadcasted by the load executionunit through the load-detection counting logic of the present invention.

A detailed description is given in the following embodiments withreference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention can be more fully understood by reading the subsequentdetailed description and examples with references made to theaccompanying drawings, wherein:

FIG. 1 is a block diagram of a superscalar microprocessor according toan embodiment of the present invention;

FIG. 2 is a block diagram of a superscalar microprocessor according toan embodiment of the present invention;

FIG. 3 is a block diagram of a qualifier according to an embodiment ofthe present invention;

FIG. 4 is a block diagram of an operand qualifier according to anembodiment of the present invention;

FIG. 5 is a block diagram of a superscalar microprocessor comprising twoload execution units according to an embodiment of the presentinvention;

FIG. 6 is a block diagram of a qualifier according to an embodiment ofthe present invention;

FIG. 7 is a block diagram of an operand qualifier for two load executionunits according to an embodiment of the present invention;

FIG. 8 is a flow chart of a micro-instruction scheduling methodaccording to an embodiment of the present invention; and

FIG. 9 is a flow chart of a micro-instruction scheduling methodaccording to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The following description is of the best-contemplated mode of carryingout the invention. This description is made for the purpose ofillustrating the general principles of the invention and should not betaken in a limiting sense. The scope of the invention is best determinedby reference to the appended claims.

It should be understand that, in this specification, the terms“including”, “comprising”, and the like are used to indicate thepresence of particular features, values, method steps, operationprocessing, elements, and components, but it is not excludes that moretechnical features, values, method steps, operation processing,elements, components, or any combination thereof may be added.

The terms, such as “first,” “second,” and “third,” recited in the claimsare used to describe elements of the claims, and are not intended toindicate the priority order, the precedence relationship, the order inwhich one element precedes another, or the chronological order forexecuting the method steps, only to distinguish elements with the samename.

FIG. 1 is a block diagram of a superscalar microprocessor according toan embodiment of the present invention. The microprocessor 100 comprisesan instruction cache 110 for caching macro-instructions with aninstruction set architecture, such as the x86 instruction setarchitecture. An instruction decoder 120 receives the macro-instructionsfrom the instruction cache 110 and translates the macro-instructionsinto micro-instructions. A register alias table 130 transfers themicro-instructions to reservation station queues 141˜147 in a scheduler140 and to a recorder buffer (ROB) 160 in a program order according tothe micro-instruction dependency. In some embodiments, reservationstation queues 141˜147 may be implemented as independent queues. Inother embodiments, the reservation station queues 141˜147 may beimplemented in a unified queue but use different ports. An executionunit 150 may comprise an integer execution unit 151, a floating-pointexecution unit 153, a load execution unit 155, and a storage executionunit 157. It should be noted that in addition to the execution unitsdescribed above, the execution unit 150 may further comprises otherexecution units, for example, a branch unit, asingle-instruction-multiple-data (SIMD) execution unit, a specialfunction units (SFU), etc. Conceptually, the integer execution unit 151,the floating-point execution unit 153, thesingle-instruction-multiple-data execution unit, and the specialfunction unit can all included in an arithmetic and logic unit (ALU),and their functions are different from the functions of the loadexecution unit 155 and the storage execution unit 157. The operationqueues 141 and 143, the load queue 145, and the storage queue 147 areconnected to the integer execution unit 151, the floating-pointexecution unit 153, the load execution unit 155, and the storageexecution unit 157, respectively. The micro-instructions in theoperation queues 141 and 143, the load queue 145, and the storage queue147 may be dispatched to the integer execution unit 151, thefloating-point execution unit 153, the load execution unit 155, and thestorage execution unit 157, respectively. It should be noted that theexecution results of the integer execution unit 151, the floating-pointexecution unit 153, the load execution unit 155, and the storageexecution unit 157 are out of order. Thus, each micro-instructioncontains a unique identifier, for example, reorder buffer indexes(ROBs), physical register file indexes (PRFs), and the like, which areused to allow execution results to be arranged in the original executionorder. The load execution unit 155 is connected to a level-1 L1 datacache 170, and a level-2 L2 data cache 180 is disposed after the firstlevel data cache. The level-2 L2 data cache 180 reads data from a mainmemory (not shown in FIG. 1) through a bus interface (not shown inFIG. 1) and writes data to the main memory. The bus interface connectsthe microprocessor 100 to a bus, for example, a local bus, a memory bus,and the like.

The load execution unit 155 is a pipeline. When executingmicro-instructions, the load execution unit 155 requests data of amemory address from the level-1 L1 data cache 170 first. If the level-1L1 data cache 170 has temporarily stored the data of the memory address(that is, a hit occurs in the level-1 L1 data cache 170, referred to as“L1 cache hit”), the data is stored to a specified location, such as aspecified register. If the level-1 L1 data cache 170 does nottemporarily store the data of the memory address (that is, a miss occursin the level-1 L1 data cache 170, also referred to as “L1 cache miss”),the load execution unit 155 requests the data of the memory address fromthe level-2 L2 data cache 180. If the level-2 L2 data cache 180 hastemporarily stored the data of the memory address (that is, a hit occursin the level-2 L2 data cache 180, referred to as “L2 cache hit”), thedata is returned to the level-1 L1 data cache 170. If the second leveldata cache 180 also does not temporarily store the data of the memoryaddress (that is, a miss occurs in the level-2 L2 data cache 180,referred to as “L2 cache miss”), the data is read from the main memory(not shown in FIG. 1) through the bus interface (not shown in FIG. 1).Therefore, those skilled in the art understand that the data requiredfor the load micro-instructions cannot necessarily be acquired andstored at the destination location within a predetermined time (forexample, n clock cycles).

There are various dependencies among the micro-instructions executed bythe integer execution unit 151, the floating-point execution unit 153,the load execution unit 155, and the storage execution unit 157. Acommon dependency is that a source operand of an integer orfloating-point arithmetic micro-instruction comes from the result of aload micro-instruction, for example:

-   -   A1=LD [Addr1];    -   A3=IADD A1, A2;    -   B1=IMUL A3, “3”;        wherein, LD represents a load micro-instruction, IADD represents        an integer addition micro-instruction, IMUL represents an        integer multiplication micro-instruction, Addr1 represents a        memory address, and A1˜A3 and B1 represent specific registers.        The load execution unit 155 executes the load micro-instruction        “A1=LD [Addr1];” to obtain data from the memory address Addr1        and store it in the register A1. The load execution unit 155        comprises a pipeline and obtains the data of the memory address        Addr1 through the level-1 L1 data cache 170. It should be noted        here that the memory address Addr1 may be temporarily stored in        the level-1 L1 data cache 170 or the level-2 L2 data cache 180        or may be only stored in the main memory (not shown in FIG. 1).        The integer execution unit 151 executes the micro-instruction        “A3=IADD A1, A2;” to add the value of the register A1 (that is,        the data of the memory address Addr1) to the value of the        register A2 and store the operation result in the register A3.        Next, the integer execution unit 151 executes the        micro-instruction “B1=IMUL A3, “3”;” to multiply the value of        the register A3 (that is, the operation result of the IADD        micro-instruction) by a constant “3” and store the operation        result in the register B1. The operand “A1” of the        micro-instruction “A3=IADD A1, A2;” directly depends on the load        micro-instruction “A1=LD [Addr1];”, while the operand “A3” of        the micro-instruction “B1=IMUL A3, “3”;” indirectly depends on        the load micro-instruction “A1=LD [Addr1];”. Although the        integer addition and the multiplication are given as an example        in the embodiment, the dependency as described above can also be        applied to other arithmetic/logic micro-instructions, special        function micro-instructions, etc., and the present invention is        not limited thereto. The arithmetic/logic micro-instructions can        indicate integer subtraction/division, floating-point        addition/subtraction/multiplication/division, logic and/or/not,        bit left/right shifting, bit rotation, logical comparison, and        so on. The special function micro-instructions can indicate the        trigonometric functions sine/cosine/Tan/Cot/Sec/Csc( ), the        square, the power of n, the square root, the n^(th) root and so        on.

In a normal case, the load execution unit 155 can acquire the data ofthe memory address Addr1 via the level-1 L1 data cache 170 at the n^(th)clock cycle. In some embodiments, for the consideration for overallperformance, at the (n−2)^(th) clock cycle occurring after the scheduler140 dispatches the micro-instruction “A1=LD [Addr1];” to the loadexecution unit 155 (hereinafter referred to as the (n−2)^(th) clockcycle), the scheduler 140 dispatches the micro-instruction “A3=IADD A1,A2;” to the integer execution unit 151. It is assumed that themicro-instruction “A3=IADD A1, A2;” can be successfully executed at thenext clock cycle after being dispatched to the integer execution unit151 (hereinafter referred to as the (n−1)^(th) clock cycle): thescheduler 140 removes the micro-instruction “A3=IADD A1, A2;” from theoperation queue 141. Next, the scheduler 140 dispatches themicro-instruction “B1=IMUL A3, “3”;” at the (n−1)^(th) clock cycle. Atthe n^(th) clock cycle, if a miss occurs in the data cache (cache miss),the execution of the micro-instruction “A3=IADD A1, A2” failed becausethe load execution unit 155 has not yet obtained the data of the memoryaddress Addr1. Also, because the execution of the micro-instruction“A3=IADD A1, A2;” is failed, the integer execution unit 151 fails toexecute the micro-instruction “B1=IMUL A3, “3”;”. However, at the n^(th)clock cycle, the micro-instruction “A3=IADD A1, A2;” has been removedfrom the operation queue 141. Thus, scheduler 140 must perform are-dispatch operation, including fetching the integer additionmicro-instruction from the reorder buffer 160, inserting the integeraddition micro-instruction into the appropriate location in theoperation queue 141, and the like. It should be noted that theperforming the re-dispatch operation will consume a lot of time andcomputing resources, which reduces the overall system performance.

FIG. 2 is a block diagram of a superscalar microprocessor according toan embodiment of the present invention. A reservation station queue 241contains a plurality of entries 241(0)˜241(q), wherein the total numberof entries in the reservation station queue 241 is q+1. Each entrystores information related to one micro-instruction that can be executedby an arithmetic and logic unit 251, such as micro-instructionidentification codes, opcodes, operands, whether the operands have beenwoken up, and the like. The arithmetic and logic unit 251 comprises, butis not limited to, the integer execution unit 151, the floating-pointnumber execution unit 153, the single-instruction-multiple-dataexecution unit, the special function unit, and the like shown in FIG. 1.The scheduler 140 (which may be implemented by the reservation station)further comprises an instruction dispatch unit 242 that uses ascheduling algorithm for each clock cycle to select one of a pluralityof micro-instructions based on the information contained in the entries,and then dispatches the selected micro-instruction to the arithmetic andlogic unit 251 at the next clock cycle. The arithmetic and logic unit251 can execute micro-instructions, such as example, EX0, EX1, WB, andthe like, in several stages. A specific hardware circuit is used forprocessing in each stage. In order to avoid performing the re-dispatchoperation as described above, the microprocessor 100 further comprises aqualifier collection 210, and the qualifier collection 210 comprises aplurality of qualifiers 210(0)˜210(q). Each of the qualifiers uniquelycorresponds to one entry in the reservation station queue 241 fordetermining whether the operands of the micro-instruction in thecorresponding entry are ready and whether the load micro-instruction onwhich the operands depend (directly or indirectly) has been confirmed.In an embodiment, a portion of the qualifier collection 210 may bedisposed within the scheduler 140, wherein, each micro-instruction maycontain a plurality of operands directly or indirectly depending on theexecution result of the load micro-instruction, for example, the operand“A1” of the micro-instruction “A3=IADD A1, A2;” depends on the executionresult of the load micro-instruction “A1=LD [Addr1];”.

At the (n−2)^(th) clock cycle occurring after the load instructiondispatch unit (not shown in FIG. 2) dispatches a load micro-instructionto the load execution unit 155, the load execution unit 155 broadcasts aload write-back signal S11 to all of the qualifiers 210(0)˜210(q) andthe scheduler 140, wherein the purpose of the load write-back signal S11is to inform that all operands in the scheduler 140 which depend on theload micro-instruction are ready, that is, the dependency have beenreleased. The load write-back signal S11 carries the unique identifierof the load micro-instruction. The unique identifier can uniquelyidentify the load micro-instruction, such as a reorder buffer index(ROB), a physical register file index (PRF) and more. In theory, thescheduler 140 receives the load write-back signal S11 at the (n−2)^(th)clock cycle, so that the instruction dispatch unit 242 can select amicro-instruction that depends on the execution result of the loadmicro-instruction from the reservation station queue 241. For example,the scheduler 140 sets the operands of the micro-instruction thatdepends on the load micro-instruction to be ready according to the loadwrite-back signal S11. If all of the operands of the micro-instructionare ready at the (n−1)^(th) clock cycle, the instruction dispatch unit242 may select the micro-instruction and dispatch the selectedmicro-instruction to the arithmetic and logic unit 251. For example, thescheduler 140 receives the load write-back signal S11, which containsthe unique identifier of the load micro-instruction “A1=LD [Addr1]”, atthe (n−2)^(th) clock cycle. If the qualifier of the micro-instruction“A3=IADD A1, A2;” determines that the unique identification code onwhich it depends is equal to the unique identification code contained inthe load write-back signal S11, and then, if all the operands of themicro-instruction “A3=IADD A1, A2;” are ready at the (n−1)^(th) clockcycle, the instruction dispatch unit 242 selects the micro-instruction“A3=IADD A1, A2;” from the reservation station queue 241, dispatches themicro-instruction “A3=IADD A1, A2;” to the arithmetic and logic unit 251at the n^(th) clock cycle, and selects the micro-instruction “B1=IMULA3, “3”;” from the reservation station queue 241 (because all theoperands of the micro-instruction “B1=IMUL A3, “3”;” are ready at then^(th) clock cycle).

When each of the qualifiers 210(0)˜210(q) receives the load write-backsignal S11, it determines whether the unique identification code onwhich its operands depend is equal to the unique identifier of the loadinstruction contained in the load write-back signal S11, that is, itdetermines whether one of the source operands of the micro-instructionof the corresponding entry depends on the execution result of the loadmicro-instruction. If so, a load-detection counting logic is triggered.When the value of the triggered load-detection counting logic reaches apredetermined value (for example, a value of 2, indicating that thesecond clock cycle which occurs after the load write-back signal S11 ofthe load instruction is broadcasted by the load execution unit 155 isreached), and the micro-instruction associated with the qualifier 210(i)has been dispatched to the arithmetic and logic unit 251 for execution(e.g., at the (n−1)^(th) clock cycle, the micro-instruction is selectedfrom the reservation station queue 241 by the instruction dispatch unit242 and dispatched to the arithmetic and logic unit 251 for execution).When a cache hit is found for the load micro-instruction through a cacheaccess status signal S12 broadcasted by the load execution unit 155, thequalifiers 210(i) generates a signal S13 indicating a load-confirmed todrive a release circuit 250 to remove micro-instruction of the entry241(i) in the reservation station queue 241, where i is an integerbetween 0 and q. When a cache miss is found for the loadmicro-instruction through the cache access status signal S12 broadcastedby the load execution unit 155, the qualifiers 210(i) generates thesignal S13 indicating a load-unconfirmed. The hardware architecture anddetailed operation of the qualifier 210(i) can refer to the followingparagraphs. It should be noted that the above-mentioned process ofdetermining whether a cache hit occurs must be after themicro-instruction is selected by the instruction dispatch unit 242 fromthe reservation station queue 241 and dispatched to the arithmetic andlogic unit 251 for execution and be executed by the qualifiers 210(i)associated with the micro-instruction. This is because a ready signal isset for the micro-instruction when it is determined to trigger theaforementioned load-detection counting logic. However, since thereseveral operands in a micro-instruction, the micro-instruction will beselected and dispatched to the arithmetic and logic unit 251 forexecution only when all of the ready signals for the micro-instructionare set. When the value of the triggered load-detection counting logicreaches the predetermined value (for example, indicating that the secondclock cycle which occurs after the load write-back signal S11 of theload instruction is broadcasted by the load execution unit 155 isreached), but the micro-instruction is not selected by the instructiondispatch unit 242 and dispatched to the arithmetic and logic unit 251because it is not ready or for other reasons, even if it is determinedthat a cache hit occurs, the qualifier 210(i) cannot issue the signalS13 to drive the release circuit 250 for removing the micro-instructionof the entry 241(i) in the reservation station queue 241. Therefore, thelogic in the qualifier 210(i) that is configured to accomplish the aboveoperation of determining whether a cache hit occurs should besynchronized with the pipeline of the arithmetic and logic unit 251.

A window checker 230 repeatedly detects the signals S13 generated by thequalifiers 210(0)˜210(q). When the signal S13 indicating aload-unconfirmed of the qualifier 210(i) is detected, a signal S17 isissued to drive the arithmetic and logic unit 251 to kill the executionof the micro-instruction of the entry (i), and a signal S16 is issued todrive the scheduler 140 to delete the micro-instruction from theinstruction dispatch unit 242 (that is, the instruction dispatch unit242 will not dispatch this micro-instruction to the arithmetic and logicunit 251 at the next clock cycle). At this time, the micro-instructionof the entry (i) that has been dispatched to the arithmetic and logicunit 251 and the micro-instruction that has been selected by the loadexecution unit 155 may be referred to as a polluted micro-instructionbecause the load micro-instruction on which they directly or indirectlydepend has not been executed successfully to read the data of thespecific memory address through the data cache. It should be noted thatthe arithmetic and logic unit 251 does not complete the execution of themicro-instruction of the entry (i) and terminates it prematurely, andthe qualifier (i) does not issue the signal S13 to drive the releasecircuit 250 to remove the micro-instruction of the entry 241(i) in thereservation station queue 241. Thus, the micro-instruction of the entry241(i) in the reservation station queue 241 is retained, therebyavoiding a replay operation. In addition, if the micro-instruction inthe load execution unit 155 has not been dispatched to the arithmeticand logic unit 251, the above logic for determining whether a cache hithas occurred will not be triggered, and the micro-instruction of theentry (i) in the reservation station queue 241 will not be removed. Forexample, it is assumed that entry 241(i) stores the micro-instruction“A3=IADD A1, A2;”. When the value of the triggered load-detectioncounting logic reaches the predetermined value and it found that thatthe load micro-instruction “A1=LD [Addr1];” is cache hit, the qualifier210(i) generates the signal S13 indicating the load-confirmed, and thesignal S13 is generated to drive the release circuit 250 to remove themicro-instruction of the entry 241 in the reservation station queue 241.When the value of the triggered load-detection counting logic reachesthe predetermined value and it is found that the load micro-instruction“A1=LD [Addr1];” is cache miss, the qualifier 210(i) generates thesignal S23 indicating the load-unconfirmed. When the window checker 230detects the signal S23 indicating the load-unconfirmed of the qualifier210(i), the window checker 230 drives the arithmetic logic unit 251 tokill the execution of the micro-instruction “A3=IADD A1, A2;” of theentry (i) and drives the scheduler 140 to deletes the micro-instruction“B1=IMUL A3, “3”;” in the instruction dispatch unit 242 (that is, theinstruction dispatch unit 242 will not dispatch the micro-instruction“B1=IMUL A3, “3”;” to the arithmetic and logic unit 251 at the nextclock cycle). In one embodiment, when it is determined that theaforementioned load-detection counting logic is to be triggered (forexample, when the unique identification code of the loadmicro-instruction contained in the write write-back signal Si 1 is equalto the unique identification code which the micro-instruction associatedwith the qualifier 210(i) depends), one of the ready signals of themicro-instruction is set. When the value of the triggered load-detectioncounting logic reaches the predetermined value and it is found that acache miss occurs for the load micro-instruction, the qualifier 210(i)further clears the aforementioned ready signal of the micro-instructionof entry in the reservation station queue 241. After a plurality ofsubsequent clock cycles, when the execution of the loadmicro-instruction is actually completed, for example, when the loadmicro-instruction is executed to load the correct data from the level-2L2 data cache 180 or the main memory, the ready signal is set again.

Furthermore, after the micro-instruction of the entry (i) is dispatchedto the arithmetic and logic unit 251, the qualifier 210(i) or thearithmetic and logic unit 251 executing the micro-instruction of theentry (i) broadcasts a write-back signal S43 to other qualifiers, sothat the values of the load-detection counting logics of thecorresponding second qualifier 210(k) is synchronized with the values ofthe load-detection counting logics of the first qualifier 210(i). Thesecond qualifier 210(k) is associated with an entry in the reservationstation queue 241, and the micro-instruction of the entry contains atleast one operand depending on the execution result of themicro-instruction of the entry (i). In an embodiment, the write-backsignal S43 contains a unique identification code of themicro-instruction of the entry (i), and a unique identification code onwhich the micro-instruction associated with the second qualifier 210(k)depends is equal to the unique identifier of the micro-instruction ofthe entry (i) contained in the write-back signal S43, that is, thesecond qualifier 210(k) determines that its associated micro-instructiondirectly depends on the micro-instruction of the entry (i).

FIG. 3 is a block diagram of a qualifier according to an embodiment ofthe present invention. The qualifier 210(i) comprises a plurality ofoperand qualifiers 310(0) through 310(p), where i is an integer between0 and q. One micro-instruction contains several source operands, and thetotal number of source operands is p+1, such as 2, 3, 4, and so on. Eachoperand qualifier 310(j) comprises one of the aforementionedload-detection counting logics. When an corresponding load-detectioncounting logic is triggered and reaches a predetermined value (forexample, a value of 2, indicating that the second clock cycle whichoccurs after the load write-back signal S11 of the load instruction isbroadcasted by the load execution unit 155 is reached), the operandqualifier 310(j) determines whether the execution status of the loadmicro-instruction on which the corresponding source operand dependsdirectly or indirectly is cache hit or cache miss according to the cacheaccess status signal S12 broadcast by the load execution unit 155. Whenthe cache access status signal S12 indicates a cache hit, a S31(j)indicating a load-confirmed is output; when the data cache access statussignal S12 indicates a cache miss, the signal S31(j) indicating aload-unconfirmed is output, where j is an integer between 0 and p. Thequalifier 210(i) further comprises an AND gate 330 that is coupled tothe signals S31(0)˜S31(p) of all of the operand qualifiers 310(0)˜(p).An output S31(j) indicates whether the j^(th) source operand is loadconfirmed, that is, the information indicating whether the depended-onload micro-instruction is cache hit. For example, S31(j)=“1” representsthe load-confirmed, S31(j)=“0” means the load-unconfirmed. If all of theoperand qualifiers which trigger the load-detection counting logicsoutput the signals indicating the load-confirmed respectively, the ANDgate 330 outputs an all-load-confirmed signal S13(i) indicating anall-load-confirmed to the window checker 230. If any one of the operandqualifiers which trigger the load-detection counting logics output thesignals indicating the load-unconfirmed, the AND gate 330 outputs thenot-all-load-confirmed signal S13(i) indicating a not-all-load-confirmedto the window checker 230.

FIG. 4 is a block diagram of an operand qualifier according to anembodiment of the present invention. In one aspect, the j^(th) operandof the micro-instruction of entry 141(i) directly depends on theexecution result of the load micro-instruction. For example, the operand“A1” of the micro-instruction “A3=IADD A1, A2;” depends on the executionresult of the micro-instruction “A1=LD [Addr1];”. The operand qualifier310(j) may determine whether a cache hit or cache miss occurs in theexecution of the load micro-instruction on which the j^(th) operanddepends when the load-detection counting logic is triggered and itsvalue reaches a predetermined value (such as, as the n^(th) time point).In detail, the operand qualifier 310(j) comprises a load confirmationregister 420 for storing the information about whether the j^(th)operand is load confirmed where j is an integer between 0 and p. In acase where it is assumed that the j^(th) operand of themicro-instruction of the corresponding entry does not exist or is notassociated with any load micro-instruction, the value of the loadconfirmation register 420 is initially “1”, which indicates that whetherthe data of the j^(th) operand of the micro-instruction of thecorresponding entry is load confirmed. The operand qualifier 310(j)further comprises a dependency register 410 for storing the informationof the micro-instruction on which the j^(th) operand of themicro-instruction of the corresponding entry depends, wherein j is aninteger between 1 and m. It is worth noted that the information of themicro-instruction on which the operand of the micro-instructions dependsis generated by the front end and stored in the dependency register 410.The operand may depend on a load instruction or other types ofinstructions. The dependency register 410 stores a unique identificationcode of the micro-instruction on which operand depends, such as reorderbuffer indexes (ROBs), physical register file indexes (PRFs), and thelike. At (n−2)^(th) clock cycle occurring after a load instructiondispatch unit (not shown in FIG. 1) dispatches a load micro-instructionto the load execution unit 155, the load execution unit 155 broadcaststhe load write-back signal S11. The load write-back signal S11 carriesthe unique identification code of the load micro-instruction. When theoperand qualifier 310(j) determines that it is equal to the uniqueidentification code which is stored on the dependency register 410 andwhich the source operand depends on, a load-detection counting logic 440is triggered.

The operand qualifier 310(j) comprises a load-detection counting logic440 that changes the latched value at each clock cycle to allow othercomponents to recognize the current phase status according to, forexample, whether the value reaches a predetermined value. Theload-detection counting logic 440 may comprise a 3-bit shift registerthat is cyclically shifted by one bit per clock cycle. A comparator 431compares the value stored in the dependency register 410 with the uniqueidentification code of the load micro-instruction carried by the loadwrite-back signal S11 at each clock cycle. The load write-back signalS11 is broadcasted by the load execution unit 155 for awaking at leastone micro-instruction depending on a particular load micro-instruction,and the load write-back signal S11 carries a unique identification codeto identify the particular load micro-instruction. When the two are thesame and the counting value carried by the load write-back signal S11 is“2′b000”, the comparator 431 outputs an enable signal E41 to an inputcircuit 433 to the input circuit and drives the input circuit 443 toreset the load-detection counting logic 440 to the value “2′b001” fortriggering the load-detection counting logic 440. At each clock cycle,the value of the load-detection counting logic 440 is shifted left byone bit. For example, during the period from the (n−2)^(th) clock cycleto the n^(th) clock cycle, the value D43 of the load-detection countinglogic 440 is sequentially changed to “2′b001”, “2′b010”, and “2′b100”. Acomparator 450 continues to compare the value D43 of the load-detectioncounting logic 440 with the predetermined value “2′b100”. When the twovalues are the same, the comparator 450 outputs an enable signal E43 toa comparator 471 and drives the comparator 471 to determine whether thecache access status signal S12 broadcasted by the load execution unit155 indicates a hit or miss. The hit and the miss can be represented byusing different numbers or voltage levels. From the above description,those skilled in the art will appreciate that the load-detectioncounting logic 440 is used to control the time point for thedetermination of the comparator 471. Although the load-detectioncounting logic 440 described in the embodiment may comprise a 3-bitshift register, those skilled in the art may implement theload-detection counting logic 440 by using a 4-bit or 5-bit shiftregister according to different design requirements for determiningwhether a cache hit or cache miss occurs in the execution of thedepended-on load micro-instruction at the third or fourth clock cycleoccurring after the load confirmation process is triggered, however, thepresent invention is not limited to the above. When the cache accessstatus signal S12 indicates a hit, the comparator 471 outputs a disabledsignal E45 to the input circuit 473, and the input circuit 473 drivesthe load confirmation register 420 to output the signal S31(j)indicating a load-confirmed. When all of the operand qualifiers 310(j)of the source operands of the micro-instruction of the entry 241(i)which trigger the load-detection counting logics 440 output the signalsS31(j) indicating the load-confirmed respectively, the qualifier 210(i)of the micro-instruction of the entry 241(i) outputs the signal S13(i)indicating an all-load-confirmed to drive the release circuit 240 toremove the micro-instruction of the entry 241(i) in the reservationstation queue 241, as described above. When the cache access statussignal S12 indicates a miss, the comparator 471 outputs the enabledsignal E45 to the input circuit 473 and drives the input circuit 473 toreset the load confirmation register 420 to “0”. Then, the loadconfirmation register 420 outputs the signal S31(j) indicating aload-unconfirmed to show that the j^(th) operand of themicro-instruction of the entry 241(i) is load unconfirmed. Once theoperand qualifier 310(j) of one source operand of the micro-instructionof the entry 241(i) outputs the signal S31(j) (such as “0”) indicatingthe load-unconfirmed, the qualifier 210(i) of the micro-instruction ofthe entry 241(i) outputs the signal S13(i) indicating anot-all-load-confirmed to drive the window checker 230. Then, the windowchecker 230 issues the signal S17 to drive the arithmetic and logic unit251 to kill the execution of the micro-instruction of the entry (i) orissues the signal S16 to delete the micro-instruction in the instructiondispatch unit 242, as described above.

In another aspect, an operand of another micro-instruction may depend onthe execution result of the micro-instruction of the entry 241(i). Forexample, the operand “A3” of the micro-instruction “B1=IMUL A3, “3”;”depends on the execution result of the micro-instruction “A3=IADD A1,A2;”. The operand qualifier 310(j) must cooperate with othercorresponding qualifier to determine whether a cache hit or cache missoccurs in the execution of the same load micro-instruction at the samepreset time point (for example, at the second clock cycle occurringafter the load write-back signal S11 of the load instruction isbroadcasted by the execution unit 155. In detail, the operand qualifier310(j) further comprises a micro-instruction register 463 for storingthe unique identification code of the micro-instruction of the entry(i). A dispatch confirmation logic 461 confirms whether themicro-instruction of the entry 241(i) has been dispatched to thearithmetic and logic unit 251 by the instruction dispatch unit 242 shownin FIG. 2 for execution. When it is confirmed that the micro-instructionof the entry 241(i) has been dispatched and written back, the dispatchconfirmation logic 461 outputs an enable signal E44 to a transfercircuit 465. Then, the transfer circuit 465 generates the write-backsignal S43 to carry the unique identification code of themicro-instruction of the entry (i) in the micro-instruction register 463and the current value D43 of the load-detection counting logic 440, andfurther broadcasts the write-back signal S43 to other operand qualifiersto the corresponding operand qualifiers the current value D43 of theload-detection counting logic 440.

In another aspect, the j^(th) operand of the micro-instruction of entry241(i) may depend on the execution result of the load micro-instructionindirectly. For example, the operand “A3” of the micro-instruction“B1=IMUL A3, “3”;” depends on the execution result of themicro-instruction “A3=IADD A1, A2;”, while the operand “A1” of themicro-instruction “A3=IADD A1, A2;” depends on the execution result ofthe micro-instruction “A1=LD [Addr1];”. The operand qualifier 310(j) maydetermine whether a cache hit or cache miss occurs in the execution ofthe indirectly depended-on load micro-instruction when itsload-detection counting logic reaches a predetermined value. In detail,the operand qualifier 310(j) receives the write-back signals S41broadcasted by another operand qualifier or arithmetic logic unit 251(that is, the write-back signal S43 broadcast by another operandqualifier described above. In the embodiment in which only onemicro-instruction is written back at each clock cycle, the write-backsignal S41 can be combined with the load write-back signal S11 to formone write-back signal), and the write-back signal S41 contains theunique identification code of another micro-instruction (for example,“A3=IADD A1, A2;”) and the counting value of the load-detection countinglogic in the operand qualifier of the another micro-instruction. Thecomparator 421 compares the value of the dependency register 410 and theunique identification code of the micro-instruction that is carried bythe write-back signal S41 at each clock cycle. When the two are thesame, the comparator 421 outputs the enable signal E42 to an inputcircuit 423 and drives the input circuit to output the counting value ofthe load-detection counting logic in the operand qualifier of thisanother micro-instruction carried by the write-back signal S41 to itsload-detection counting logic 440, such as “2′b010”. The subsequentoperation of the load-detection counting logic 440 may refer to thedescription of the above paragraphs, and the description will not berepeated for brevity. It should be noted that the cache access statussignal S12 broadcasted by the load execution unit 155 does not carry anyunique identification code. The present invention ensures that thesource operand corresponding to the operand qualifier 310(j) in whichthe load-detection counting logic 440 reaches the predetermined value“2′b100” must directly or indirectly depend on the loadmicro-instruction corresponding to the cache access status signal S12broadcasted by the load execution unit 155.

Table 1 shows the actuation sequence of the micro-instructions in asuperscalar microprocessor according to an embodiment:

TABLE 1 Micro-instruction T₀ . . . T_(n-2) T_(n-1) T_(n) A1 = LD[Addr1]; X . . . LD0 LD1 LD2 A3 = IADD A1, A2; . . . Disp EX0 B1 = IMULA3, “3”; . . . Disp The value of the first load- 000 000 001 010 100detection counting logic The value of the second load- 000 000 000 010100 detection counting logic

The first load-detection counting logic is associated with the operand“A1” of the micro-instruction “A3=IADD A1, A2;”, and the secondload-detection counting logic is associated with the operand “A3” of themicro-instruction “B1=IMUL A3, “3”;”. At the time point T₀, the loadmicro-instruction “A1=LD [Addr1];” is dispatched to the load executionunit 155. At the time point T_(n-2), the load execution unit 155broadcasts the load write-back signal S11, so that the value of thefirst load-detection counting logic is set to “2′b001”. At the timepoint T_(n-1), the micro-instruction “A3=IADD A1, A2;” is selected(labeled as “Disp”), the value of the first load-detection countinglogic is updated to “2′b010”, and the value of the second load-detectioncounting logic is synchronized with “2′b010”. At the time point T_(n-1),the micro-instruction “A3=IADD A1, A2;” is dispatched to the arithmeticand logic unit 251 (labeled “EX0”), the micro-instruction “B1=IMUL A3,“3”;” is selected (labeled as “Disp”), the value of the firstload-detection counting logic is updated to “2′b100”, and the value ofthe second load-detection counting logic is synchronized with “2′b100”.Since both of the values of the first and second load-detection countinglogics reach “2′b100”, the qualifiers associated with themicro-instructions “A3=IADD A1, A2;” and “B1=IMUL A3, “3”;” must checkthe cache access status signal S12 broadcast by the load execution unit155.

In some embodiments, to improve the efficiency of data loading, thearchitecture described in FIG. 2 may be modified to comprise more thantwo (including two) load execution units. FIG. 5 is a block diagram of asuperscalar microprocessor comprising two load execution units accordingto an embodiment of the present invention. Load execution units 155(0)and 155(1) can execute two load micro-instructions in parallel.Therefore, two source operands of an integer or floating-pointarithmetic micro-instruction may come from the results of the loadmicro-instructions which are executed in parallel, for example:

-   -   A1=LD0 [Addr1];    -   A2=LD1 [Addr2];    -   A3=IADD A1, A2;    -   B1=IMUL A3, “3”;        wherein, LD0 represents a load micro-instruction executed by the        load execution unit 155(0), LD1 represents a load        micro-instruction executed by the load execution unit 155(1),        IADD represents an integer addition micro-instruction, IMUL        represents an integer multiplication micro-instruction, Addr1        and Addr2 represent memory addresses, and A1˜A3 and B1 represent        specific registers. The load execution unit 155(0) executes the        load micro-instruction “A1=LD0 [Addr1];” to obtain data from the        memory address Addr1 and store it in the register A1. The load        execution unit 155(1) executes the load micro-instruction        “A2=LD1 [Addr2];” to obtain data from the memory address Addr2        and store it in the register A2. The scheduler 140 dispatches        the load micro-instructions “A1=LD0 [Addr1];” and “A2=LD1        [Addr2];” to the load execution units 155(0) and 155(1)        respectively. The technical details of the load execution units        155(0) and the load execution unit 155(1) are similar to the        load execution unit 155 and will not be described again for        brevity. The arithmetic and logic unit 251 executes the        micro-instruction “A3=IADD A1, A2;” to add the value of the        register A1 (that is, the data of the memory address Addr1) to        the value of the register A2 (that is, the data of the memory        address Addr2) and store the operation result in the register        A3. Next, the arithmetic and logic unit 251 executes the        micro-instruction “B1=IMUL A3, “3”;” to multiply the value of        the register A3 (that is, the operation result of the IADD        micro-instruction) by a constant “3” and store the operation        result in the register B1. The operand “A1” of the        micro-instruction “A3=IADD A1, A2;” directly depends on both of        the load micro-instructions “A1=LD0 [Addr1];” and “A2=LD1        [Addr2];”, while the operand “A3” of the micro-instruction        “B1=IMUL A3, “3”;” indirectly depends on both of the load        micro-instructions “A1=LD0 [Addr1];” and “A2=LD1 [Addr2];”.

The microprocessor may comprise a qualifier collection 510, and thequalifier collection 510 comprises a plurality of qualifiers510(0)˜510(q). Each of the qualifier uniquely corresponds to one entryin the reservation station queue 241 for determining whether the loadmicro-instruction on which the micro-instruction in the entry depends(directly or indirectly) is ready. Each micro-instruction may contain aplurality of operands directly depending on the execution results of theload micro-instructions or a plurality of operands indirectly dependingon the execution results of the load micro-instructions, for example,the operand “A1” of the micro-instruction “A3=IADD A1, A2;” depends onthe execution result of the load micro-instruction “A1=LD0 [Addr1];”,and the operand “A1” thereof depends on the execution result of the loadmicro-instruction “A2=LD1 [Addr2];”.

At the (n−2)^(th) clock cycle occurring after the load instructiondispatch unit (not shown in FIG. 5) dispatches two loadmicro-instructions the load execution units 155(0) and 155(1)respectively, the load execution unit 155(0) broadcasts a loadwrite-back signal S11(0) to all of qualifiers 510(0)˜510(q) and thescheduler 140, while the load execution unit 155(1) broadcasts a loadwrite-back signal S11(1) to all of qualifiers 510(0)˜510(q) and thescheduler 140, wherein the purpose of the load write-back signals S11(0)and S11(1) are to inform that all operands in the scheduler 140 whichdepend on the two load micro-instructions are ready. The load write-backsignals S11(0) and S11(1) carry the unique identifiers of the two loadmicro-instructions. In theory, the scheduler 140 receives the loadwrite-back signals S11(0) and S11(1) at the (n−2)^(th) clock cycle, and,then, the instruction dispatch unit 242 selects a micro-instruction thatdepends on the execution results of the two load micro-instructions fromthe reservation station queue 241. For example, the scheduler 140 setsthe operands of the micro-instruction that depends on the two loadmicro-instructions to be ready according to the load write-back signalsS11(0) and S11(1). If all of the operands of the micro-instruction areready at the n^(th) clock cycle, the instruction dispatch unit 242 mayselect the micro-instruction, dispatch the selected micro-instruction tothe arithmetic and logic unit 251, and select a micro-instruction thatdepends on the execution result of the dispatched micro-instructionsfrom the reservation station queue 241. For example, at the (n−2)^(th)clock cycle, the scheduler 140 receives the load write-back signalS11(0), which contains the unique identifier of the first loadmicro-instruction “A1=LD0 [Addr1]” and the load write-back signalS11(1), which contains the unique identifier of the second loadmicro-instruction “A2=LD1 [Addr2]”. If the qualifier of themicro-instruction “A3=IADD A1, A2;” determines that the uniqueidentification codes on which its two operands depend are equal to theunique identification codes contained in the load write-back signalsS11(0) and S11(1), the instruction dispatch unit 242 selects the readymicro-instruction “A3=IADD A1, A2;” from the reservation station queue241 at the (n−1)^(th) clock cycle, dispatches the micro-instruction“A3=IADD A1, A2;” to the arithmetic and logic unit 251 at the n^(th)clock cycle, and selects the micro-instruction “B1=IMUL A3, “3”;” fromthe reservation station queue 241 (because all the operands of themicro-instruction “B1=IMUL A3, “3”;” are ready at the n^(th) clockcycle).

When each of the qualifiers 510(0)˜510(q) receives the load write-backsignal S11(0), it determines whether the unique identification code onwhich its operands depend is equal to the unique identifier of the loadinstruction contained in the load write-back signal S11(0), that is, itdetermines whether one of the source operands of the micro-instructionof the corresponding entry depends on the execution result of the firstload micro-instruction. If so, a load-detection counting logic istriggered. When each of the qualifiers 510(0)˜510(q) receives the loadwrite-back signal S11(1), it determines whether the uniqueidentification code on which its operands depend is equal to the uniqueidentifier of the load instruction contained in the load write-backsignal S11(1), that is, it determines whether one of the source operandsof the micro-instruction of the corresponding entry depends on theexecution result of the second load micro-instruction. If so, aload-detection counting logic is triggered, too. When the value of thetriggered load-detection counting logic reaches a predetermined value(for example, a value of 2, indicating that the second clock cycle whichoccurs after the load write-back signals S11 of the load instructionsare broadcasted by the load execution unit 155 is reached), and themicro-instruction associated with the qualifier 210(i) has beendispatched to the arithmetic and logic unit 251 for execution (e.g., atthe (n−1)^(th) clock cycle, the micro-instruction is selected from thereservation station queue 241 by the instruction dispatch unit 242 anddispatched to the arithmetic and logic unit 251 for execution). When acache hit is found for both of the load micro-instructions which need tobe confirmed through cache access status signals S12(0) and S12(1)broadcasted by the load execution units 155(0) and 155(1), thequalifiers 510(i) generates a signal S13 indicating a load-confirmed todrive a release circuit 250 to remove micro-instruction of the entry241(i) in the reservation station queue 241, where i is an integerbetween 0 and q. When a cache miss is found for one of the loadmicro-instructions which need to be confirmed through the cache accessstatus signals S12(0) and S12(1) broadcasted by the load execution units155(0) and 155(1), the qualifiers 510(i) generates the signal S13indicating a load-unconfirmed.

FIG. 6 is a block diagram of a qualifier according to an embodiment ofthe present invention. The qualifier 510(i) comprises a plurality ofoperand qualifiers 610(0) through 610(p), where i is an integer between0 and q. One micro-instruction contains several source operands, and thetotal number of source operands is p+1, such as 2, 3, 4, and so on.Assume that the 0^(th) operand of the entry 241(i) depends on the loadmicro-instruction executed by load execution unit 155(0), and the firstoperand of the entry 241(i) depends on the load micro-instructionexecuted by the load execution unit 155(1). If all of the operandqualifiers 610(0)˜610(p) in the qualifier 510(i) that trigger theload-detection counting logics outputs signals indicating aload-confirmed, the gate 330 outputs a signal S13(i) indicating anall-load-confirmed to the window checker 230. If any one of the operandqualifiers which trigger the load-detection counting logics output asignal indicating a load-unconfirmed (for example, the operand qualifier610(0) or/and the operand qualifier 610(1) output a signal indicatingthe load-unconfirmed), the AND gate 330 outputs a signal S13(i)indicating a not-all-load-confirmed to the window checker 230.

Each operand qualifier 310(j) comprises one of the aforementionedload-detection counting logics. When an corresponding load-detectioncounting logic is triggered and reaches a predetermined value (forexample, a value of 2, indicating that the second clock cycle whichoccurs after the load write-back signal S11 of the load instruction isbroadcasted by the load execution unit 155 is reached), the operandqualifier 310(j) determines whether the execution status of the loadmicro-instruction on which the corresponding source operand dependsdirectly or indirectly is cache hit or cache miss according to the cacheaccess status signal S12 broadcast by the load execution unit 155. Whenthe cache access status signal S12 indicates a cache hit, a S31(j)indicating a load-confirmed is output; when the data cache access statussignal S12 indicates a cache miss, the signal S31(j) indicating aload-unconfirmed is output, where j is an integer between 0 and p. Thequalifier 210(i) further comprises an AND gate 330 that is coupled tothe signals S31(0)˜S31(p) of all of the operand qualifiers 310(0)˜(p).An output S31(j) indicates whether the j^(th) source operand is loadconfirmed, that is, the information indicating whether the depended-onload micro-instruction is cache hit. For example, S31(j)=“1” representsthe load-confirmed, S31(j)=“0” means the load-unconfirmed. If all of theoperand qualifiers which trigger the load-detection counting logicsoutput the signals indicating the load-confirmed respectively, the ANDgate 330 outputs a signal S13(i) indicating an all-load-confirmed to thewindow checker 230. If any one of the operand qualifiers which triggerthe load-detection counting logics output a signal indicating theload-unconfirmed, the AND gate 330 outputs a signal S13(i) indicating anot-all-load-confirmed to the window checker 230.

FIG. 7 is a block diagram of an operand qualifier for two load executionunits according to an embodiment of the present invention. When thej^(th) operand of a micro-instruction of a corresponding entry dependson the load micro-instruction executed by the load execution unit 155(0)or 155(1), the comparator 431 compares the value stored in thedependency register 410 (that is the information of themicro-instruction on which the j^(th) operand of the micro-instructionof the corresponding entry depends) with the unique identification codeof the load micro-instruction carried by the load write-back signalS11(0) at each clock cycle. The load write-back signal S11(0) is used bythe load execution unit 155(0) to awake at least one micro-instructiondepending on the load micro-instruction executed by it. When the two arethe same and it is determined that the counting value carried by theload write-back signal S11(0) is “2′b000”, the comparator 431 resets theload-detection counting logic 440 to the value “2′b001” for triggeringthe load-detection counting logic 440. Moreover, the comparator 432compares the value stored in the dependency register 410 with the uniqueidentification code of the load micro-instruction carried by the loadwrite-back signal S11(1) at each clock cycle. The load write-back signalS11(1) is used by the load execution unit 155(1) to awake at least onemicro-instruction depending on the load micro-instruction executed byit. When the two are the same and the counting value carried by the loadwrite-back signal S11(1) is “2′b000”, the comparator 432 resets theload-detection counting logic 440 to the value “2′b011” for triggeringthe load-detection counting logic 440. The different initial values“2′b001” and “2′b011” are used to allow subsequent components torecognize whether the cache access status signal S12(0)/S12(1) broadcastby the load execution unit 155(0) or the load execution unit 155(1)should be monitored at the decision time point The case in which theload-detection counting logic 440 is reset by the comparator 431indicates that resetting the load-detection counting logic 440 to thevalue “2′b001” is induced by the load write-back signal S11(0) writtenback by the load execution unit 155(0). The case in which theload-detection counting logic 440 is reset by the comparator 432indicates that resetting the load-detection counting logic 440 to thevalue “2′b011” is induced by the load write-back signal S11(1) writtenback by the load execution unit 155(1).

The comparator 450 continues to compare the value D43 of theload-detection counting logic 440 with the predetermined value “2′b100”.When the two values are the same, the comparator 450 outputs an enablesignal E43 to the comparator 471 and drives the comparator 471 todetermine whether the cache access status signal S12(0) broadcasted bythe load execution unit 155(0) indicates a hit or miss. When the cacheaccess status signal S12(0) indicates a miss, the comparator 471 drivesthe input circuit 473 to reset the load confirmation register 420 to“0”, which indicates that the data of the j^(th) operand of themicro-instruction of the entry 241(i) is load confirmed The comparator460 continues to compare the value D43 of the load-detection countinglogic 440 with the predetermined value “2′b101”. When the two values arethe same, the comparator 460 outputs an enable signal E47 to thecomparator 472 and drives the comparator 472 to determine whether thecache access status signal S12(1) broadcasted by the load execution unit155(1) indicates a hit or miss. When the cache access status signalS12(1) indicates a miss, the comparator 472 drives the input circuit 473to reset the load confirmation register 420 to “0”, which indicates thatthe data of the j^(th) operand of the micro-instruction of the entry241(i) is load confirmed. The detailed operations of other components inFIG may refer to the related description of FIG. 4, and the relateddescription will not be repeated here for brevity.

Table 2 shows the actuation sequence of the micro-instructions in asuperscalar microprocessor according to another embodiment:

TABLE 2 Micro-instruction T₀ . . . T_(n-2) T_(n-1) T_(n) A1 = LD0[Addr1]; X . . . LD0 LD1 LD2 A2 = LD1 [Addr2]; X . . . LD0 LD1 LD2 A3 =IADD A1, A2; . . . Disp EX0 The value of the first load- 000 . . . 001010 100 detection counting logic The value of the second load- 000 . . .011 110 101 detection counting logicThe first load-detection counting logic is associated with the operand“A1” of the micro-instruction “A3=IADD A1, A2;”, and the secondload-detection counting logic is associated with the operand “A2” of themicro-instruction “A3=IADD A1, A2;”. At the time point T₀, the loadmicro-instruction “A1=LD0 [Addr1];” is dispatched to the load executionunit 155(0), and the load micro-instruction “A2=LD1 [Addr2];” isdispatched to the load execution unit 155(1), simultaneously. At thetime point T_(n-2), the load execution unit 155(0) broadcasts the loadwrite-back signal S11(0), so that the value of the first load-detectioncounting logic is set to “2′b001”; the load execution unit 155(1)broadcasts the load write-back signal S11(1), so that the value of thesecond load-detection counting logic is set to “2′b011”. At the timepoint T_(n-1), the micro-instruction “A3=IADD A1, A2;” is selected(labeled as “Disp”), the value of the first load-detection countinglogic associated with “A1” is updated to “2′b010”, and the value of thesecond load-detection counting logic associated with “A2” is updated to“2′b110”. At the time point T_(n), the micro-instruction “A3=IADD A1,A2;” is dispatched to the arithmetic and logic unit 251 (labeled “EX0”),the value of the first load-detection counting logic is updated to“2′b100”, and the value of the second load-detection counting logic isupdated to “2′b101”. Since the values of the first and secondload-detection counting logics reach “2′b100” and “2′b101” respectively,the qualifiers associated with the operands “A1” and “A2” of themicro-instruction “A3=IADD A1, A2;” must check the cache access statussignals S12(0) and S12(1) broadcast by the load execution units 155(0)and 155(1), respectively.

In some embodiments, those skilled in the art can modify the operandqualifier 610(j) shown in FIG. 7 to determine whether the data loadingof the source operand indirectly depending on two loadmicro-instructions is confirmed. The operation of the operand qualifier610(j) of the operand “A3” in the micro-instruction “B1=IMUL A3, “3”;”depending on the micro-instruction “A3=IADD A1, A2” is further describedbelow. The qualifier 510(i) of the micro-instruction “A3=IADD A1, A2”further comprises a comparator (not shown in FIG. 6) which operates withthe operand qualifier 610(j) of the operand “A1” and the operandqualifier 610(j+1) of the operand “A2”. The comparator compares thevalue latched by the load-detection counting logic (that is the firstload-detection counting logic in Table 2) of the operand qualifier610(j) of the operand “A1” with a first predetermined value “2′b010” andcompares the value latched by the load-detection counting logic (that isthe second load-detection counting logic in Table 2) of the operandqualifier 610(j+1) of the operand “A2” with a second predetermined value“2′b110”. When the first and second load-detection counting logicsrespectively reach the predetermined values “2′b010” and “2′b110” at thesame time, a synchronization counting value is set to a fifthpredetermined value “2′b111”. When the qualifier 510(i) of themicro-instruction “A3=IADD A1, A2” confirms that the micro-instruction“A3=IADD A1, A2” has been dispatched and written back, the qualifier510(i) generates a write-back signal S43 which carries the uniqueidentification code of the micro-instruction “A3=IADD A1, A2” and thesynchronization counting value “2′b111” and broadcasts the write-backsignal S43 to the operand qualifiers of the other micro-instructions.

When the operand qualifier 610(j) of the operand “A3” of themicro-instruction “B1=IMUL A3, “3”;” depending on the micro-instruction“A3=IADD A1, A2” receives the aforementioned write-back signal S43 (forexample, corresponding to the write-back signal S41 of FIG. 4), theoperand qualifier 610(j) synchronizes the value of its ownload-detection counting logic 440 with the fifth predetermined value“2′b111”. When the value of the load-detection counting logic 440 is“2′b111”, the operand qualifier 610(j) of the operand “A3” needs tosimultaneously determine the cache access status signal S12(0)broadcasted by the first load execution unit 155(0) and the cache accessstatus signal S12(1) broadcasted by the second load execution unit155(1). Only when both of the first and second cache access statussignals S12(0) and S12(1) indicate a hit, the signal S31(j) indicating aload-confirmed is output as “1” to indicate that the operand “A3” of themicro-instruction is load confirmed. Once one of the first and secondcache access status signals S12(0) and S12(1) indicates a hit, the loadconfirmation register 420 is reset to “0” to output a signal S31(j)indicating a load-unconfirmed is output as “1” to indicate that theoperand “A3” of the micro-instruction is load unconfirmed.

It is worth noted that in the embodiment of FIG. 5 where there are twoload execution units 155(0) and 155(1), the block diagram of the operandqualifier 610(j) shown in FIG. 7 is only an example, and the presentinvention is not limited thereto. In other embodiments, the operandqualifier 610(j) of FIG. 7 may further comprise two load-detectioncounting logics 440 for detecting the execution conditions (for example,hit/miss) of the load instructions executed by the two load executionunits 155(0) and 155(1). The load-detection counting logic 440 of theoperand qualifier 610(j) of the FIG. 7 adopts a relatively smartcounting manner: the load execution unit 155(0) corresponds to thecounting value “2′b000”, “2′ B001”, “2′b010”, and “2′b100”, and the loadexecution unit 155(1) corresponds to the counting values “2′b000”,“2′b011”, “2′b110”, and “2′b101”. Thus, only one load-detection countinglogic 440 is sufficient to show the execution stages of the loadinstructions executed by the two load execution units 155(0) and 155(1),which saves circuitry area for one load-detection counting logic.

FIG. 8 is a flow chart of a micro-instruction scheduling methodaccording to an embodiment of the present invention. This method isexecuted by the qualifier 210(i) or 510(i) for scheduling an operationmicro-instruction directly depending on a load micro-instructionaccording to on the execution status of the load micro-instruction. Thequalifier 210(i) or 510(i) detects the load write-back signal S11,S11(0) or S11(1) broadcasted by the load execution unit 155, 155(0) or155(1) every clock cycle (Step S810) and determines whether theload-detection counting logic 440 is triggered according to the contentsof the load write-back signal S11, S11(0) or S11(1) (Step S820). On theother hand, Step S820 is performed to determine whether the loadexecution unit 155, 155(0) or 155(1) wakes up the micro-instruction ofthe entry (i). In detail, each of the operand qualifiers 310(0)˜310(p)of the qualifier 210(i) determines whether the load write-signal S11contains the value stored in the dependency register 410, or each of theoperand qualifier 610(0)˜610(p) of the qualifier 510(i) determineswhether the load write-back signal S11(0) or S11(1) contains the valuestored in the dependent register 410. Step S820 can be accomplishedthrough the comparator 431 or 432. When it is determined that theload-detection counting logic 440 is triggered (the “YES” path from StepS820), the load-detection counting logic 440 starts being shifted left(step S830). In other embodiments, for Step S830, the load-detectioncounting logic 440 can perform counting by other means (for example, thecounting value is incremented by one every clock cycle), however, thepresent invention is not limited thereto. Then, when the triggeredload-detection counting logic 440 reaches a predetermined value (forexample, the load-detection counting logic is shifted left from “2′b001”to the predetermined value “2′b100” or from “2′b011” to thepredetermined value “2′b101”, cyclically), it is determined whether theexecution status of the directly depended-on load micro-instruction iscache hit (step S850). In Step S850, whether the determination timepoint is reached can be determined by determining whether the value ofthe load-detection counting logic 440 reaches the predetermined value.Step S850 may be accomplished through the comparator 450 in an operandqualifier of the qualifier 210(i) or through comparator 450 in oneoperand qualifier of the qualifier 510(i) or/and the comparator 460 inanother operand qualifier thereof. When the execution status of thedirectly depended-on load micro-instruction is cache hit and themicro-instruction has been dispatched to the arithmetic and logic unit251 for execution (the “YES” path from Step S850), the micro-instructionof the entry 241(i) in the reservation station queue 241 is removed(Step S860). Step S860 can be accomplished by driving the releasecircuit 250. When the execution status of the directly depended-on loadmicro-instruction is cache miss and the micro-instruction has beendispatched to the arithmetic and logic unit 251 for execution (the “No”path from Step S850), the execution of the micro-instruction of theentry (i) is killed, or the micro-instruction of the entry (i) isdeleted from the instruction dispatch unit 242 (step S870). Step S870can be accomplished by driving the arithmetic and logic unit 251. Itshould be noted here that when the execution status of the depended-onload micro-instruction is cache miss, the micro-instruction of the entry(i) may not have been selected and dispatched from the instructiondispatch unit 242. Thus, in this case, the killing or deleting in StepS870 is not performed, however, the present invention is not limitedthereto.

FIG. 9 is a flow chart of a micro-instruction scheduling methodaccording to an embodiment of the present invention. This method isexecuted by the qualifier 210(i) or 510(i) for scheduling an operationmicro-instruction indirectly depending on a load micro-instructionaccording to on the execution status of the load micro-instruction. Thequalifier 210(i) or 510(i) (associated with the first micro-instruction)detects the write-back signal S41 broadcasted by the operand qualifierof another micro-instruction (such as the second micro-instruction)every clock cycle (Step S910) and determines whether the value of theload-detection counting logic according to the content of the write-backsignal S41 is to be synchronized (step S920), that is, whether the valueof its first load-detection counting logic is to be set to a value,carried by the write-back signal S41, of a second load-detectioncounting logic of the operand qualifier of the second micro-instructionbroadcasting the write-back signal S41. In detail, each of the operandqualifiers 310(0)˜310(p) of the qualifier 210(i) or each of the operandpass checkers 610(0)˜610(p) of the qualifier 510(i) determines whetherthe unique identification code of the second micro-instruction containedin the write-back signal S41 is equal to the unique identification codestored in the dependency register 410. Step S920 can be accomplished bythe comparator 421. When it is determined that the value of theload-detection counting logic is to be synchronized (the “YES” path fromStep S920), the value of the load-detection counting logic 440 is set tothe value of the second load-detection counting logic of the operandqualifier of the second micro-instruction related to the write-backsignal S41. In other embodiments, for Step S930, the load-detectioncounting logic 440 can perform counting by other means (for example, thesynchronized value is incremented by one after every clock cycle),however, the present invention is not limited thereto. Then, thesynchronized value of the first load-detection counting logic 440reaches a predetermined value (for example, the load-detection countinglogic is shifted left from “2′b010” to the predetermined value “2′b100”or from “2′b110” to the predetermined value “2′b101”, cyclically), it isdetermined whether the execution statuses of all of the indirectlydepended-on load micro-instructions are cache hit (step S950). In StepS950, whether the determination time point is reached can be determinedby determining whether the value of the load-detection counting logic440 reaches the predetermined value. Step S950 may be accomplishedthrough the comparator 450 in an operand qualifier of the qualifier210(i) or through comparator 450 in one operand qualifier of thequalifier 510(i) or/and the comparator 460 in another operand qualifierthereof. When the execution statuses of all of the indirectlydepended-on load micro-instructions are cache hit and the firstmicro-instruction has been dispatched to the arithmetic and logic unit251 for execution (“YES” path in step S950), the micro-instruction ofthe entry (i) 241 in the reservation station queue 241 is removed (stepS960). Step S960 can be accomplished by driving the release circuit 250.When the execution status of any one of the depended-on loadmicro-instructions is cache miss and the first micro-instruction hasbeen dispatched to the arithmetic and logic unit 251 for execution (the“No” path from Step S950), the arithmetic and logic unit 251 kills theexecution of the first micro-instruction, or the micro-instruction ofthe entry (i) is deleted from the instruction dispatch unit 242 (stepS970). It should be noted here that when the execution status of any oneof the depended-on load micro-instructions is cache miss, the firstmicro-instruction of the entry (i) may not have been selected by theinstruction dispatch unit 242. Thus, in this case, a deleting operationis not performed in Step S970, however, the present invention is notlimited thereto.

Although FIGS. 1-7 comprise the above-described elements, more otheradditional elements can be used without departing from the spirit of theinvention to achieve a better technical effect. Further, the processingsteps in FIGS. 8 and 9 are performed in a specific order, however, thoseskilled in the art can modify the order of these steps for achieve thesame effect without departing from the spirit of the invention. Thus,the invention is not limited to the order as described above.

While the invention has been described by way of example and in terms ofthe preferred embodiments, it is to be understood that the invention isnot limited to the disclosed embodiments. On the contrary, it isintended to cover various modifications and similar arrangements (aswould be apparent to those skilled in the art). Therefore, the scope ofthe appended claims should be accorded the broadest interpretation so asto encompass all such modifications and similar arrangements.

What is claimed is:
 1. A method for scheduling micro-instructions,performed by a first qualifier, wherein the first qualifier isassociated with a first micro-instruction, and the firstmicro-instruction depends on a load micro-instruction executed by a loadexecution unit, the method comprising: detecting a load write-backsignal broadcasted by the load execution unit; determining whether totrigger a load-detection counting logic according to content of the loadwrite-back signal; determining whether an execution status of the loadmicro-instruction is cache hit when the triggered load-detectioncounting logic reaches a predetermined value; and driving a releasecircuit to remove the first micro-instruction in a reservation stationqueue when the execution status of the load micro-instruction is cachehit and the first micro-instruction has been dispatched to an arithmeticand logic unit for execution.
 2. The method for schedulingmicro-instructions as claimed in claim 1, further comprising: drivingthe arithmetic and logic unit to kill execution of the firstmicro-instruction when the execution status of the loadmicro-instruction is cache miss.
 3. The method for schedulingmicro-instructions as claimed in claim 1, wherein when the executionstatus of the load micro-instruction is cache miss, the firstmicro-instruction in the reservation station queue is retained frombeing removed.
 4. The method for scheduling micro-instructions asclaimed in claim 1, wherein when it is determined to trigger theload-detection counting logic, a ready signal of one operand of thefirst micro-instruction is set, and after the ready signals of all theoperands of the first micro-instruction are set, the firstmicro-instruction is dispatched to the arithmetic and logic unit forexecution.
 5. The method for scheduling micro-instructions as claimed inclaim 4, wherein when the execution status of the load micro-instructionis cache miss, the ready signal of the first micro-instruction iscleared, and when execution of the load micro-instruction is completed,the ready signal is set again.
 6. The method for schedulingmicro-instructions as claimed in claim 1, further comprising:determining to trigger the load-detection counting logic when a uniqueidentification code of the load micro-instruction contained in the loadwrite-back signal is equal to a unique identification code on which thefirst micro-instruction depends.
 7. The method for schedulingmicro-instructions as claimed in claim 1, further comprising:broadcasting a write-back signal to other qualifiers by the arithmeticand logic unit after the first micro-instruction is dispatched to thearithmetic and logic unit for execution to allow a second qualifier tosynchronize a value of the load-detection counting logic, wherein thesecond qualifier is associated with a second micro-instruction dependingon the first micro-instruction.
 8. The method for schedulingmicro-instructions as claimed in claim 7, wherein when the secondqualifier synchronizes the value of the load-detection counting logic, aready signal of the second micro-instruction is set, and when thesynchronized value of the load-detection counting logic reaches thepredetermined value, it is determined whether the execution status ofthe load micro-instruction is cache hit.
 9. A scheduler device formicro-instructions comprising: a reservation station queue; a releasecircuit coupled to the reservation station queue; and a first qualifier,coupled to the release circuit, detecting a first load write-back signalbroadcasted by a first load execution unit, determining whether totrigger a load-detection counting logic according to content of thefirst load write-back signal, determining whether an execution status ofa first load micro-instruction is cache hit when the triggeredload-detection counting logic reaches a first predetermined value, anddriving the release circuit to remove the first micro-instruction in thereservation station queue when the execution status of the first loadmicro-instruction is cache hit and the first micro-instruction has beendispatched to an arithmetic and logic unit for execution, wherein thefirst qualifier is associated with the first micro-instruction, and thefirst micro-instruction depends on the first load micro-instructionexecuted by the first load execution unit.
 10. The scheduler device asclaimed in claim 9, wherein when it is determined to trigger theload-detection counting logic, a ready signal of one operand of thefirst micro-instruction is set, and after the ready signals of all theoperands of the first micro-instruction are set, an instruction dispatchunit selects the first micro-instruction from the reservation stationqueue and dispatches the first micro-instruction to the arithmetic andlogic unit for execution.
 11. The scheduler device as claimed in claim9, wherein the first qualifier comprises: a plurality of operandqualifiers, each operand qualifier associated with one of a plurality ofoperands of the first micro-instruction, and each operand qualifiercomprising one load-detection counting logic, wherein when thecorresponding load-detection counting logic is triggered and reaches thefirst predetermined value, the corresponding operand qualifierdetermines whether the execution status of the first loadmicro-instruction on which the corresponding operand directly depends iscache hit or cache miss according to a first cache access status signalbroadcasted by the first load execution unit, and when the executionstatus of the first load micro-instruction is cache hit, thecorresponding operand qualifier outputs a load-confirmed signal; and anAND gate coupled to the plurality of operand qualifiers, wherein wheneach of the plurality of operand qualifiers outputs the load-confirmedsignal, the AND gate outputs an all-load-confirmed signal to drive therelease circuit to remove the first micro-instruction of an entry in thereservation station queue.
 12. The scheduler device as claimed in claim11, wherein each of the plurality of operand qualifiers comprises: theload-detection counting logic initially latching a first value andchanging the latched value every clock cycle; a first comparator,coupled to the load-detection counting logic, repeatedly comparing aunique identification code on which the first micro-instruction directlydepends with a unique identification code carried by the first loadwrite-back signal and resetting the first value when the uniqueidentification code on which the first micro-instruction directlydepends is equal to the unique identification code carried by the firstload write-back signal; a second comparator, coupled to theload-detection counting logic, continuing to compare the value latchedin the load-detection counting logic with the first predetermined valueand outputting an enable signal to a third comparator when the latchedvalue is equal to the first predetermined value; and the thirdcomparator, coupled to the second comparator, determining whether thefirst cache access status signal indicates a cache hit or cache miss andoutputting the load-confirmed signal when the first cache access statussignal indicates the cache hit.
 13. The scheduler device as claimed inclaim 12, wherein the load-detection counting logic is implemented by a3-bit shift register and shifted by one bit every one clock cycle andthe first value is “2′b000”, wherein when the unique identification codeon which the first micro-instruction directly depends is equal to theunique identification code carried by the first load write-back signal,the first comparator resets the first value as “2′b001”, and wherein thefirst predetermined value is “2′b100”.
 14. The scheduler device asclaimed in claim 9, wherein when the execution status of the first loadmicro-instruction is cache miss, the first qualifier drives thearithmetic and logic unit to terminate an execution of the firstmicro-instruction or drives a scheduler to delete the firstmicro-instruction from an instruction dispatch unit.
 15. The schedulerdevice as claimed in claim 14, wherein when the execution status of thefirst load micro-instruction is cache miss, the first qualifier retainsthe first micro-instruction in the reservation station queue is retainedfrom being removed.
 16. The scheduler device as claimed in claim 11,wherein each of the plurality of operand qualifier comprises: theload-detection counting logic initially latching a first value andchanging the latched value every clock cycle; a first comparator,coupled to the load-detection counting logic, repeatedly comparing aunique identification code on which the first micro-instruction directlydepends with a unique identification code carried by the first loadwrite-back signal and resetting the first value to a second value whenthe unique identification code on which the first micro-instructiondirectly depends is equal to the unique identification code carried bythe first load write-back signal; a second comparator, coupled to theload-detection counting logic, repeatedly comparing the uniqueidentification code on which the first micro-instruction directlydepends with a unique identification code carried by a second loadwrite-back signal broadcasted by a second load execution unit andresetting the first value to a third value when the uniqueidentification code on which the first micro-instruction directlydepends is equal to the unique identification code carried by the secondload write-back signal, wherein the third value is different from thesecond value; a third comparator, coupled to the load-detection countinglogic, continuing to compare the value latched in the load-detectioncounting logic with the first predetermined value and outputting a firstenable signal to a fourth comparator when the latched value is equal tothe first predetermined value; the fourth comparator, coupled to thethird comparator, determining whether the first cache access statussignal indicates a cache hit or cache miss and outputting theload-confirmed signal when the first cache access status signalindicates the cache hit; a fifth comparator, coupled to theload-detection counting logic, continuing to compare the value latchedin the load-detection counting logic with a second first predeterminedvalue and outputting a second enable signal to a sixth comparator whenthe latched value is equal to the second predetermined value; and thesixth comparator, coupled to the fifth comparator, determining whether asecond cache access status signal broadcasted by the second loadexecution unit indicates a cache hit or cache miss and outputting theload-confirmed signal when the second cache access status signalindicates the cache hit.
 17. The scheduler device as claimed in claim16, wherein the load-detection counting logic is implemented by a 3-bitshift register and shifted by one bit every one clock cycle, the firstvalue is “2′b000”, the second value is “2′b001”, the third value is“2′b011”, the first predetermined value is “2′b100”, and the secondpredetermined value is “2′b101”.
 18. The scheduler device as claimed inclaim 9, wherein after the first micro-instruction is dispatched to thearithmetic and logic unit for execution, the arithmetic and logic unitbroadcasts a write-back signal to other qualifiers to allow a secondqualifier to synchronize a value of the load-detection counting logic ofthe first qualifier, wherein the second qualifier is associated with asecond micro-instruction directly depending on the firstmicro-instruction.
 19. The scheduler device as claimed in claim 18,wherein the second qualifier synchronizes a value of a secondload-detection counting logic with the value of the load-detectioncounting logic according to the write-back signal, and when the secondload-detection counting logic reaches the first predetermined value, thesecond qualifier determines whether the execution status of the firstload micro-instruction is cache hit.
 20. The scheduler device as claimedin claim 11, wherein the first qualifier further comprises: a seventhcomparator, coupled to each of the plurality of operand qualifiers,continuing to compare the value latched in the load-detection countinglogic of each operand qualifier with a third predetermined value or afourth predetermined value, setting a synchronization counting value toa fifth predetermined value when the values latched in two of theload-detection counting logics of the plurality of operand qualifiersare equal to the third predetermined value and the fourth predeterminedvalue respectively, and broadcasting a write-back signal to otherqualifiers after the first micro-instruction is dispatched to thearithmetic and logic unit for execution to allow a second qualifier tosynchronize a value of a second load-detection counting logic with thesynchronization counting value, wherein the second qualifier isassociated with a second micro-instruction directly depending on thefirst micro-instruction.
 21. The scheduler device as claimed in claim20, wherein when the value of the second load-detection counting logicof the second qualifier is equal to the fifth predetermined, the secondqualifier determines the first cache access status signal broadcasted bythe first load execution unit and a second cache access status signalbroadcasted by a second load execution unit.
 22. The scheduler device asclaimed in claim 20, wherein each of the load-detection counting logicand the second load-detection counting logic is implemented by a 3-bitshift register and shifted by one bit every one clock cycle, the thirdpredetermined value is “2′b010”, the fourth predetermined value is“2′b110”, and the fifth predetermined value is “2′b111”.